import request from './idnex'
import { item } from '../types/index'
export const getTodos = () => {
    return request({url:'/gettodoList', method:'get'})
}

export const addTodo = (data:item) => request({url:'/addtodo', method:'post', data})

export const change_state = (id:string) => request({url:'/changeState', method:'post', data:{id}}) 

export const deleteByid = (id:string) => request({url:'/deletetodoByid', method:'post', data:{id}}) 

export const deleteAllchanged = () => request({url:'/deleteChangedtodo', method:'post'})

export const changeAllState = () => request({url:'/changeAllstate', method:'post'})

export const getState = () => request({url:'/getstate', method:'get'})


